<include file="public:header" />
  <div class="toptip link_g">
    <h2>提示：</h2>
    <p>
      有效职位是指：审核通过、审核中、服务未到期等网站能正常显示的职位。<br />
	  无效职位是指：审核未通过、服务到期等网站前台不显示的职位。<br />
</p>
  </div>
  <div class="seltpye_y">
    <div class="tit link_lan">
      <strong>职位列表</strong><span>(共找到{$total}条)</span>
      <a href="{:U('index')}">[恢复默认]</a>
      <div class="pli link_bk"><u>每页显示：</u>
        <a href="{:P(array('pagesize'=>10))}" <if condition="!$Think.get.pagesize || $Think.get.pagesize eq '10'">class="select"</if>>10</a>
        <a href="{:P(array('pagesize'=>20))}" <if condition="$Think.get.pagesize eq '20'">class="select"</if>>20</a>
        <a href="{:P(array('pagesize'=>30))}" <if condition="$Think.get.pagesize eq '30'">class="select"</if>>30</a>
        <a href="{:P(array('pagesize'=>60))}" <if condition="$Think.get.pagesize eq '60'">class="select"</if>>60</a>
        <div class="clear"></div>
      </div>
    </div>
    <div class="list">
      <div class="t">有效状态</div>
      <div class="txt link_lan">
        <a href="{:P(array('jobtype'=>0))}" <if condition="$Think.get.jobtype eq '0' || $Think.get.jobtype eq ''">class="select"</if>>不限<span>({$count[0]})</span></a>
        <a href="{:P(array('jobtype'=>1))}" <if condition="$Think.get.jobtype eq '1'">class="select"</if>>有效职位<span>({$count[1]})</span></a>
        <a href="{:P(array('jobtype'=>2))}" <if condition="$Think.get.jobtype eq '2'">class="select"</if>>无效职位<span>({$count[2]})</span></a>
      </div>
    </div>
    
    <div class="list">
      <div class="t">审核状态</div>
      <div class="txt link_lan">
        <a href="{:P(array('audit'=>''))}" <if condition="$Think.get.audit eq ''">class="select"</if>>不限</a>
		 <a href="{:P(array('audit'=>'2'))}" <if condition="$Think.get.audit eq '2'">class="select"</if>>等待审核<span <if condition="$count[4] gt 0">style="color:#FF0000"</if>>({$count[4]})</span></a>
        <a href="{:P(array('audit'=>'1'))}" <if condition="$Think.get.audit eq '1'">class="select"</if>>审核通过<span>({$count[3]})</span></a>
       
		<if condition="$Think.get.jobtype neq 1">
        <a href="{:P(array('audit'=>'3'))}" <if condition="$Think.get.audit eq '3'">class="select"</if>>审核未通过<span>({$count[5]})</span></a>
		 </if>
      </div>
    </div>
	
	<if condition="$Think.get.jobtype eq '2'">
    <div class="list listod">
      <div class="t">无效原因</div>
      <div class="txt link_lan">
        <a href="{:P(array('invalid'=>'0'))}" <if condition="!$Think.get.invalid || $Think.get.invalid eq '0'">class="select"</if>>不限</a>
        <a href="{:P(array('invalid'=>'2'))}" <if condition="$Think.get.invalid eq '2'">class="select"</if>>套餐到期</a>
        <a href="{:P(array('invalid'=>'3'))}" <if condition="$Think.get.invalid eq '3'">class="select"</if>>职位暂停</a>
        <a href="{:P(array('invalid'=>'4'))}" <if condition="$Think.get.invalid eq '4'">class="select"</if>>非审核通过</a>
      </div>
    </div>
    </if>
    
    
    <div class="list listod" >
      <div class="t">服务到期</div>
      <div class="txt link_lan">
        <a href="{:P(array('deadline'=>''))}" <if condition="$Think.get.deadline eq ''">class="select"</if>>不限</a>
        <if condition="$Think.get.jobtype eq '2'">
        <a href="{:P(array('deadline'=>'1'))}" <if condition="$Think.get.deadline eq '1'">class="select"</if>>已到期</a>
        <a href="{:P(array('deadline'=>'2'))}" <if condition="$Think.get.deadline eq '2'">class="select"</if>>未到期</a>
        </if>
        <a href="{:P(array('deadline'=>'3'))}" <if condition="$Think.get.deadline eq '3'">class="select"</if>>三天内</a>
        <a href="{:P(array('deadline'=>'7'))}" <if condition="$Think.get.deadline eq '7'">class="select"</if>>一周内</a>
        <a href="{:P(array('deadline'=>'30'))}" <if condition="$Think.get.deadline eq '30'">class="select"</if>>一月内</a>
      </div>
    </div>
    
    <div class="list listod" >
      <div class="t">推广类型</div>
      <div class="txt link_lan">
        <a href="{:P(array('promote'=>''))}" <if condition="$Think.get.promote eq ''">class="select"</if>>不限</a>
        <a href="{:P(array('promote'=>'-1'))}" <if condition="$Think.get.promote eq '-1'">class="select"</if>>未推广</a>
        <a href="{:P(array('promote'=>1))}" <if condition="$Think.get.promote eq 1">class="select"</if>>置顶</a>
        <a href="{:P(array('promote'=>2))}" <if condition="$Think.get.promote eq 2">class="select"</if>>紧急</a>
      </div>
    </div>
    
    
    
    <div class="list" >
      <div class="t">添加时间</div>
      <div class="txt link_lan">
        <a href="{:P(array('addsettr'=>''))}" <if condition="$Think.get.addsettr eq ''">class="select"</if>>不限</a>
        <a href="{:P(array('addsettr'=>'3'))}" <if condition="$Think.get.addsettr eq '3'">class="select"</if>>三天内</a>
        <a href="{:P(array('addsettr'=>'7'))}" <if condition="$Think.get.addsettr eq '7'">class="select"</if>>一周内</a>
        <a href="{:P(array('addsettr'=>'30'))}" <if condition="$Think.get.addsettr eq '30'">class="select"</if>>一月内</a>
      </div>
    </div>
    
    <div class="list" >
      <div class="t">刷新时间</div>
      <div class="txt link_lan">
        <a href="{:P(array('settr'=>''))}" <if condition="$Think.get.settr eq ''">class="select"</if>>不限</a>
        <a href="{:P(array('settr'=>'3'))}" <if condition="$Think.get.settr eq '3'">class="select"</if>>三天内</a>
        <a href="{:P(array('settr'=>'7'))}" <if condition="$Think.get.settr eq '7'">class="select"</if>>一周内</a>
        <a href="{:P(array('settr'=>'30'))}" <if condition="$Think.get.settr eq '30'">class="select"</if>>一月内</a>
      </div>
    </div>
    <notempty name="apply['Subsite']">
      <div class="list" >
        <div class="t">所属分站</div>
        <qscms:subsite 列表名="subsite_list"/>
        <div class="txt link_lan">
          <a href="{:P(array('subsite_id'=>''))}" <if condition="$Think.get.subsite_id eq ''">class="select"</if>>不限</a>
          <if condition="$visitor['role_id'] eq 1">
            <volist name="subsite_list" id="subsite">
              <a href="{:P(array('subsite_id'=>$subsite['s_id']))}" <if condition="$Think.get.subsite_id eq $subsite['s_id']">class="select"</if>>{$subsite.s_sitename}</a>
            </volist>
          <else/>
            <volist name="subsite_list" id="subsite">
              <if condition="in_array($subsite['s_id'],$visitor['subsite'])">
                <a href="{:P(array('subsite_id'=>$subsite['s_id']))}" <if condition="$Think.get.subsite_id eq $subsite['s_id']">class="select"</if>>{$subsite.s_sitename}</a>
              </if>
            </volist>
          </if>
        </div>
      </div>
      </notempty>
      <div class="clear"></div>
    </div>
  <form id="form1" name="form1" method="post" action="{:U('set_audit')}">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="list" class="link_lan">
      <tr>
        <td   class="admin_list_tit admin_list_first">
          <label id="chkAll"><input type="checkbox" name=" " title="全选/反选" id="chk"/>职位名称</label></td>
          <td  class="admin_list_tit"> 发布公司 </td>
          <td align="center"  width="10%" class="admin_list_tit">审核状态</td>
          <td align="center" width="10%" class="admin_list_tit">来源</td>
          <td align="center"  width="10%" class="admin_list_tit">添加时间</td>
          <td align="center" width="10%"  class="admin_list_tit">刷新时间</td>
          <td align="center" width="10%" class="admin_list_tit">点击</td>
          <td    width="100" align="center"  class="admin_list_tit">操作</td>
      </tr>
        <volist name="list" id="vo">
        <tr>
          <td  class="admin_list admin_list_first">
            <input name="id[]" type="checkbox" value="{$vo['id']}"  />
            <a href="{$vo['jobs_url']}" target="_blank" <if condition="($vo['deadline'] lt $now && $vo['deadline'] neq 0) || $vo['display'] eq '2'">style="color:#999999"</if>>{$vo['jobs_name']}</a>
            <if condition="$vo['emergency'] eq '1'">&nbsp;<span style="color: #FF6600">[急聘]</span></if>
            <if condition="$vo['recommend'] eq '1'">&nbsp;<span style="color: #339900">[推荐]</span></if>
            <if condition="$vo['stick'] eq '1'">&nbsp;<span style="color: #FF3399">[置顶]</span></if>
            <if condition="$vo['highlight'] neq ''">&nbsp;<span style="color: #6633CC">[变色]</span></if>
            <if condition="$vo['display'] eq '2'">&nbsp;<span style="color: #999999">[已暂停]</span></if> 
			
			
			<span class="view jobs_log" title="职位日志" parameter="id={$vo['id']}">&nbsp;&nbsp;&nbsp;&nbsp;</span>
			</td>
          <td class="admin_list">
            
			<a href="{$vo['company_url']}" target="_blank" style="color: #000000" title="{$vo['companyname']}">{$vo['companyname']}</a>          <if condition="$vo['company_audit'] eq 1">&nbsp;<span style="color: #009900" title="已认证企业">[已认证]</span></if>
			<if condition="$vo['famous'] eq 1">&nbsp;<span style="color: #FF6600" title=" 诚聘通企业">[诚]</span></if>
			</td>
          <td class="admin_list" align="center">
            <if condition="$vo['audit'] eq '1'">
            <span style="color: #009900">审核通过 </span>
            <elseif condition="$vo['audit'] eq '2'"/>
            <span style="color:#FF0000">等待审核</span>
            <elseif condition="$vo['audit'] eq '3'"/>
            审核未通过            </if>
			<span class="view audit_log" title="查看日志" parameter="type=jobs_id&id={$vo['id']}">&nbsp;&nbsp;&nbsp;&nbsp;</span>
			</td>
          <td class="admin_list"align="center" >
            <if condition="$vo['robot'] eq '0'">人工</if>
            <if condition="$vo['robot'] eq '1'">采集</if>          </td>
          <td class="admin_list" align="center" >
            {:admin_date($vo['addtime'])}          </td>
          <td class="admin_list" align="center" >
            {:admin_date($vo['refreshtime'])}          </td>
          <td class="admin_list" align="center" >
            {$vo['click']}          </td>
          <td class="admin_list" align="center" >
        	<a href="{:U('jobs/edit',array('id'=>$vo['id']))}">编辑</a>&nbsp;            
            <a class="userinfo"  parameter="uid={$vo['uid']}" href="javascript:void(0);" hideFocus="true">管理</a>&nbsp;
            <a href="{:U('delete_jobs',array('id'=>$vo['id']))}" >删除</a>
		  </td>
        </tr>
      </volist>
      </table>
      <span id="OpAudit"></span>
</form>
    <if condition="!$list">
    <div class="admin_list_no_info">没有任何信息！</div>
    </if>
    <table width="100%" border="0" cellspacing="10" cellpadding="0" class="admin_list_btm">
      <tr>
        <td>
          <input name="ButAudit" type="button" class="admin_submit" id="ButAudit"    value="审核"  />
          <input type="button" name="Butrefresh"  id="Butrefresh" value="刷新" class="admin_submit"/>
          <input type="button" name="ButDel"  id="ButDel" value="删除" class="admin_submit"/>
        </td>
        <td width="305" align="right">
          <form id="formseh" name="formseh" method="get" action="?">
          <input type="hidden" name="m" value="{:MODULE_NAME}">
          <input type="hidden" name="c" value="{:CONTROLLER_NAME}">
          <input type="hidden" name="a" value="{:ACTION_NAME}">
            <div class="seh">
              <div class="keybox"><input name="key" type="text"   value="{$Think.get.key}" /></div>
              <div class="selbox">
                <input name="key_type_cn"  id="key_type_cn" type="text" value="{$Think.get.key_type_cn|default='职位名'}" readonly="true"/>
                <div>
                  <input name="key_type" id="key_type" type="hidden" value="{$Think.get.key_type|default='1'}" />
                  <div id="sehmenu" class="seh_menu">
                    <ul>
                      <li id="1" title="职位名">职位名</li>
                      <li id="2" title="公司名">公司名</li>
                      <li id="3" title="职位ID">职位ID</li>
                      <li id="4" title="公司ID">公司ID</li>
                      <li id="5" title="会员ID">会员ID</li>
                    </ul>
                  </div>
                </div>
              </div>
              <div class="sbtbox">
                <input type="submit" name="" class="sbt" id="sbt" value="搜索"/>
              </div>
              <div class="clear"></div>
            </div>
          </form>
        </td>
      </tr>
    </table>
    <div class="qspage">{$page}</div>
    <div style="display:none" id="AuditSet">
      <table width="400" border="0" align="center" cellpadding="0" cellspacing="6">
        <tr>
          <td width="20" height="30">&nbsp;</td>
          <td height="30"><strong  style="color:#0066CC; font-size:14px;">将所选职位置为：</strong></td>
        </tr>
        
        <tr>
          <td width="40" height="25">&nbsp;</td>
          <td>
            <label><input name="audit" type="radio" value="1" checked="checked"  id="success" />
          审核通过</label></td>
        </tr>
        <tr>
          <td width="40" height="25">&nbsp;</td>
          <td>
            <label><input type="radio" name="audit" value="3"  id="fail"/>
          审核未通过</label></td>
        </tr>
        <tr id="reason">
          <td width="40" height="25" >备注：</td>
          <td>
            <textarea name="reason" id="reason" cols="50" style="font-size:12px"></textarea>
          </td>
        </tr>
        <tr>
          <td height="25">&nbsp;</td>
          <td>
            <input type="submit" name="set_audit" value="确定" class="admin_submit"/>
          </td>
        </tr>
      </table>
    </div>
  </div>
    <include file="public:footer" />
<script type="text/javascript">
$(document).ready(function()
{
  showmenu("#key_type_cn","#sehmenu","#key_type");
  $("#ButAudit").QSdialog({
  DialogAddObj:"#OpAudit",
  DialogTitle:"请选择",
  DialogContent:"#AuditSet",
  DialogContentType:"id"
  });
  
  $(".userinfo").QSdialog({
  DialogTitle:"管理",
  DialogContentType:"url",
  DialogContent:"{:U('ajax/userinfo')}&"
  });
  
   $(".jobs_log").QSdialog({
  DialogTitle:"职位日志",
  DialogContentType:"url",
  DialogContent:"{:U('ajax/jobs_log')}&"
  });
   $(".audit_log").QSdialog({
  DialogTitle:"审核日志",
  DialogContentType:"url",
  DialogContent:"{:U('ajax/audit_log')}&"
  });
    //点击批量删除
  $("#ButDel").click(function(){
    if (confirm('你确定要删除吗？'))
    {
       $("form[name=form1]").attr("action","{:U('delete_jobs')}");
      $("form[name=form1]").submit()
    }
  });
  //刷新
  $("#Butrefresh").click(function(){
      $("form[name=form1]").attr("action","{:U('refresh_jobs')}");
      $("form[name=form1]").submit()
  });
  
  //纵向列表排序
  $(".listod .txt").each(function(i){
  var li=$(this).children(".select");
  var htm="<a href=\""+li.attr("href")+"\" class=\""+li.attr("class")+"\">"+li.text()+"</a>";
  li.detach();
  $(this).prepend(htm);
  });
    
  
});
</script>
</body>
</html>